<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<script type="text/javascript" src="${basePath}/public/lib/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="${basePath}/public/lib/jquery/1.9.1/jquery.min.js"></script>
<#include "lib/lib.html" />
<title>修改车辆信息</title>
</head>
<body>
<div class="pd-20">
	<form action="${basePath}/car/updateCar.do" method="post"  class="form form-horizontal" id="form-area-add" enctype="multipart/form-data">
		<input type="hidden" name="id" value="${info.id}"/>
		<div class="row cl">
			<label class="form-label col-3"><span class="c-red">*</span>车牌号：</label>
			<div class="formControls col-5">
				<input type="text" class="input-text" value="${info.carCode!}" id="carCode" name="carCode">
			</div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-3">车辆品牌：</label>
			<div class="formControls col-5">
				<input type="text" class="input-text" value="${info.carBrand!}" id="carBrand" name="carBrand">
			</div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-3">车辆型号：</label>
			<div class="formControls col-5">
				<input type="text" class="input-text" value="${info.carModel!}" id="carModel" name="carModel">
			</div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-3">车辆颜色：</label>
			<div class="formControls col-5">
				<input type="text" class="input-text" value="${info.carColor!}" id="carColor" name="carColor">
			</div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-3">联系人姓名：</label>
			<div class="formControls col-5">
				<input type="text" class="input-text" value="${info.linkMan!}" id="linkMan" name="linkMan">
			</div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-3">联系人电话：</label>
			<div class="formControls col-5">
				<input type="text" class="input-text" value="${info.linkTel!}" id="linkTel" name="linkTel">
			</div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<label class="form-label col-3">车辆图片：</label>
			<div class="formControls col-5">
				  <span class="btn-upload">
				  	<a href="javascript:void();" class="btn btn-primary radius"><i class="iconfont">&#xf0020;</i> 浏览文件</a>
				 	<input type="file" id="fileImage" value="null" name="file" class="input-file" accept="image/png,image/jpg,image/jpeg,imge/bmp,image/gif">
				 </span>
				 <img alt="" src="${info.carImages!}" width="160" height="160">
			</div>
			<div class="col-4"> </div>
		</div>
		<div class="row cl">
			<div class="col-9 col-offset-3">
				<button type="button" onclick="submitBtn()" class="btn btn-success radius" id="admin-role-save" name="admin-role-save">
						<i class="icon-ok"></i> 确定
				</button>
				<button type="button" onclick="layer_close()" class="btn btn-success radius" id="admin-role-close"
						name="admin-role-close">
						<i class="icon-ok"></i>取消
					</button>
			</div>
		</div>
	</form>
</div>
<script type="text/javascript">
function submitBtn(){
	var carCode = $("#carCode").val();
	if(carCode == ""){
		layer.msg('车牌号不能为空', {
			icon : 1,
			time : 1000
		});
		return ;
	}
	$("#form-area-add").ajaxForm({
		success:function(data) {
			if(data == 200){
				layer.msg('添加成功!', {icon: 6,time:1000});
				window.parent.location.href="${basePath}/car/list.do";
			}else{
				layer.msg(data.data, {icon: 5,time:1000});
			}
		},      
		dataType:"json"   
	}).submit(); 	
}

</script>
</body>
</html>